<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<html>
<head>
	<title>封条管理及验证系统--消息发布管理</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<%@ include file="/comm.jsp"%>
<style type="text/css">
<!--
fieldset {
    padding:10px;
    margin:10px;
    width:270px;
    color:#333; 
} 
legend {
    color:#06c;
    font-weight:800; 
} 
	-->
</style>

	<body>
	<s:form name ="formpage" action="notice_list" namespace="/">
		<div>
  		<%@ include file="/messages.jsp"%>
			<fieldset>
				<legend>
					查询条件
				</legend>
				<table align="left" width="760" border="0">
					<tr>
						<td align="right">
							有效日期：</td>
						<td width="220px">
						<input id="dStartdate" name="noticeDto.fromDate" 
						 	value='<s:date name="#request.noticeDto.fromDate" format="yyyy-MM-dd" />'
						 	size="13" class="Wdate" type="text" onFocus="WdatePicker({maxDate:'#F{$dp.$D(\'dEnddate\')}'})"/> 
						至<input id="dEnddate" name="noticeDto.toDate" 
						 	value='<s:date name="#request.noticeDto.toDate" format="yyyy-MM-dd" />'
						 	size="13" class="Wdate" type="text" onFocus="WdatePicker({minDate:'#F{$dp.$D(\'dStartdate\')}'})"/>
						</td>
						<td align="right">
							分类：</td>
						<td>
							<s:select list="#{'':'全部','10':'系统通知','11':'业界动态','12':'知识库'}"	 
							 name="noticeDto.type"
					  		 value="#request.noticeDto.type" 
					  		 id="type"
					  		 cssStyle="width:100px" >
							</s:select>
						</td>
						<td align="right">
							状态：</td>
						<td>
							<s:select list="#{'':'全部','0':'未发布','1':'已发布','2':'已删除'}"	 
							 name="noticeDto.status"
					  		 value="#request.noticeDto.status" 
					  		 id="status"
					  		 cssStyle="width:100px" >
							</s:select>
						</td>
						<td>
							<input type="submit" class="button" id="ok" name="ok" value=" 查 询 " />
							&nbsp;&nbsp;
							<s:submit action="notice_editPage" value=" 新 增 "></s:submit>
						</td>
						<td></td>
					</tr>
				</table>
			</fieldset>
			</div>
            <table border="0" cellpadding="5" cellspacing="1" class="tb_datalist">
			 <tr align="center" height="28px" class="tr_title">
				<td>
					<b>标题</b>
				</td>
				<td>
					<b>分类</b>
				</td>
				<td>
					<b>子类</b>
				</td>
				<td>
					<b>语言</b>
				</td>
				<td>
					<b>有效日期</b>
				</td>
				<td>
					<b>状态</b>
				</td>
				<td>
					<b>更新日期</b>
				</td>
				<!--
				<td>
					<b>创建日期</b>
				</td>
				
				<td>
					<b>更新人</b>
				</td>
				 -->
				<td>
					<b>操作</b>
				</td>
			</tr>
			
			<s:iterator id="sa" value="#request.list">
				<tr class="list_tr_item"
						onMouseOver="javascript:this.className='tr_selected';"
						onMouseOut="javascript:this.className='tr_even';">
					<td>
						<a href="<s:url action="notice_view"><s:param name="id"><s:property value="#sa.id"/></s:param></s:url>">
							<s:property value="#sa.title" />
						</a>
					</td>
					<td align="center">
						<s:property value="showTypeStr(#sa.type)" />
					</td>
					<td align="center">
						<s:property value="showSubtypeStr(#sa.type,#sa.subtype)" />
					</td>
					<td>
						<s:if test='"zh_CN"==#sa.lang'>
							中文
						</s:if>
						<s:elseif test='"en"==#sa.lang'>
							英文
						</s:elseif>
					</td>
					<td align="center">
						<s:date name="#sa.startDate" format="yyyy-MM-dd"/>	
						至
						<s:date name="#sa.endDate" format="yyyy-MM-dd"/>	
					</td>
					<td align="center">
						<s:if test="0==#sa.status">
							未发布
						</s:if>
						<s:elseif test="1==#sa.status">
							已发布
						</s:elseif>
						<s:elseif test="2==#sa.status">
							已删除
						</s:elseif>
					</td>
					<td align="center">
						<s:date name="#sa.updateDate" format="yyyy-MM-dd HH:mm"/>
					</td>
					<!-- 
					<td align="center">
						<s:date name="#sa.createDate" format="yyyy-MM-dd HH:mm"/>
					</td>
					<td>
						<s:property value="#sa.updateUserid" />
					</td>
					 -->
					<td align="center">
						<s:if test="0==#sa.status || 1==#sa.status">
							<a href="<s:url action="notice_editPage"><s:param name="id"><s:property value="#sa.id"/></s:param></s:url>">
								修改
							</a>
						</s:if>
						<s:if test="0==#sa.status">
							<a href="<s:url action="notice_view"><s:param name="id"><s:property value="#sa.id"/></s:param></s:url>">
								发布
							</a>
						</s:if>
						<s:if test="2!=#sa.status">
						<a href="<s:url action="notice_delete"><s:param name="id"><s:property value="#sa.id"/></s:param></s:url>">
							删除
						</a>
						</s:if>
					</td>	
				</tr>
			</s:iterator>
		</table>
		<s:property value="#request.allowpage" escape="false" />
		</s:form>
	</body>
</html>
